<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>



<div class="page-header">
	<h2><spring:message code="login.title" /></h2>
	<spring:message code="login.title.explain" />
</div>

<c:if test="${not empty errorLogin}">
	<div class="alert alert-error">
		<spring:message code="login.failed" />
		<%--
		Caused :
		${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
		 --%>
	</div>
</c:if>


<form method="post" action="<spring:url value='j_spring_security_check' />" class="well form-horizontal">
	<div class="row-fluid">
		<!-- id -->
		<div class="control-group">
		   	<label class="control-label"><spring:message code="login.fied.login" /></label>
		   	<div class="controls">
		   		<input name="j_username" value="<c:out value="${SPRING_SECURITY_LAST_USERNAME}"/>" placeholder="<spring:message code="login.fied.login" />" class="input-medium"/>
	   		</div>
		</div>
		<div class="control-group">
		   	<label class="control-label"><spring:message code="login.fied.password" /></label>
		   	<div class="controls">
		   		<input type="password" name="j_password" value='' placeholder="<spring:message code="login.fied.password" />" class="input-medium"/>
	   		</div>
		</div>

			
		<div class="form-actions">
			<button class="btn btn-primary" type="submit"><spring:message code="common.btn.valid" /></button>
		</div>

	</div>
</form>